// 这里放置所有可以mixin的组件，方便可以多次调用

// unit子组件通用样式，注意要在content组件里边引入继承，不要每个unit子组件都引入
@mixin unitCommon{
    .unit-common{
        margin-top: 10px;
        .header{
            color: #333;
            background-color: #f5f5f5;
            padding: 4px 15px;
            height: 34px;
            line-height: 34px;
            border-top: 1px solid #ddd;
            border-bottom: 1px solid #ddd;
            &:hover{
                cursor: pointer;
                .icon-iconfontbi,
                .icon-shanchu1,
                .icon-fuzhi,
                .icon-yidong{
                    visibility: visible;
                }
                .icon-fuzhi,{
                    cursor: copy;
                }
                .icon-yidong{
                    cursor: move;
                }
            }
            input[type='text']{
                background: transparent;
                width: 20%;
                height: 34px;
                box-sizing: border-box;
                padding: 6px 12px;
                font-size: 16px;
                line-height: 1.42857143;
                border: 0px solid transparent;
                box-sizing: border-box;
            }
            i{
                height: 34px;
                line-height: 34px;
                cursor: pointer;
            }
            .icon-shanchu1{
                margin-right: 20px;
            }
            .icon-fuzhi,.icon-iconfontbi,.icon-yidong{
                margin-right: 10px;
            }
            .arrow-up{
                transform: rotate(180deg);
                transition: transform 0.3s ;
            }
            .arrow-down{
                transform: rotate(0);
                transition: transform 0.3s;
            }
        }
        .content {
            overflow: auto;
            >ul{
                padding: 20px;
                >li{
                    font-size: 14px;
                    margin-top: 10px;
                    height: 34px;
                    line-height: 34px;
                    position: relative;
                    >label{
                        width: 15%;
                        text-align: right;
                    }
                    input[type='text']{
                        width: 80%;
                        height: 34px;
                        box-sizing: border-box;
                        padding: 6px 25px 6px 12px;
                        font-size: 14px;
                        line-height: 1.42857143;
                        color: #555;
                        background-color: #fff;
                        background-image: none;
                        border: 1px solid #ccc;
                        border-radius: 4px;
                        box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
                        &:focus{
                            border-color: #66afe9;
                            outline: 0;
                            box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102,175,233,.6);
                        }
                    }
                    input.input-color{
                        width: 88px;
                        margin-left: 5%;
                        cursor: not-allowed;
                    }
                    .rc-color-picker-wrap {
                        margin: 4px 0 0 8px;
                    }
                    textarea{
                        border: 1px solid #ccc;
                        &:focus{
                            border-color: #66afe9;
                            outline: 0;
                            box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102,175,233,.6);
                        }
                    }
                    .upload{
                        position: absolute;
                        right: 0px;
                        top: -2px;
                        padding: 2px 8px;
                        cursor: pointer;
                        .ant-upload-list{
                            display: none;
                        }
                    }
                    >ul{
                        width: 80%;
                        li{
                            margin-left: 15px;
                            input[type='text']{
                                width: 56px !important;
                                padding: 6px;
                            }
                            label{
                                padding-left: 10px;
                            }
                            &:first-child{
                                margin-left: 0px;
                            }
                        }
                        .label-left{
                            label{
                                padding-left: 0;
                                padding-right: 10px;
                            }
                        }
                    }
                    &:first-child{
                        margin-top: 0px;
                    }
                }
            }
        }
        .show-detail{
            // 在unit子组件里边定义具体大小，才会有动态效果
            height: initial;
            transition: height 0.3s;
        }
        .hide-detail{
            height: 0;
            transition: height 0.3s;
        }
    }
}






